using System;
using NUnit.Framework;

namespace ProgrammingLanguageNr1
{
	[TestFixture()]
	public class AST_TEST
	{
		[Test()]
		public void SimpleAST ()
		{			
			Token plus = new Token(Token.TokenType.OPERATOR, "+");
			Token one = new Token(Token.TokenType.NUMBER, "1");
			Token two = new Token(Token.TokenType.NUMBER, "2");
			
			AST root = new AST(plus);
			root.addChild(new AST(one));
			root.addChild(new AST(two));
			
			AST list = new AST(null);
			list.addChild(new AST(one));
			list.addChild(new AST(two));
			
			Assert.AreEqual("(+ 1 2)", root.getTreeAsString());
		}
	}
}

